From: Giovanni Campagna Date: Thu, 26 Jun 2014 16:45:06 +0000 (+0200) Subject: background: fix early destroy of SystemBackground X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~1013^2^2~2386 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=cfef1071145629603fec7e124909e77545579e62;p=gnome-shell.git background: fix early destroy of SystemBackground If the SystemBackground is destroyed before loading, we call removeImageContent() with null, which crashes. --- diff --git a/js/ui/background.js b/js/ui/background.js index 3730beb3a..021269989 100644 --- a/js/ui/background.js +++ b/js/ui/background.js @@ -659,7 +659,10 @@ const SystemBackground = new Lang.Class({ }, _onDestroy: function() { - this._cache.removeImageContent(this.actor.content); + let content = this.actor.content; + + if (content) + this._cache.removeImageContent(content); }, }); Signals.addSignalMethods(SystemBackground.prototype);